package com.fengxing.ams.web.facade.mouble.student;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface IStudentSCMDAO extends PagingAndSortingRepository<StudentSCMVO, String>, JpaSpecificationExecutor<StudentSCMVO>  {
	@Query(value="select * from zyt_student where id=:id", nativeQuery=true)
	StudentSCMVO findByStudentId(@Param("id")String id);

	@Modifying
	@Query(value="delete from zyt_student where id in (:ids)", nativeQuery=true)
	void deleteByIds(@Param("ids")List<String> ids);

	@Modifying
	@Query(value="update zyt_student set status=:status where id =:id", nativeQuery=true)
	void updateStatus(@Param("status")Integer nextStatus, @Param("id")String id);
}

